<template>
  <div>
    <h3>{{companyName}}</h3>
    <van-field
        readonly
        clickable
        :value="questionValue"
        label="问题级别"
        placeholder="点击选择问题级别"
        @click="showPicker = true"
      />
      <van-popup v-model="showPicker" position="bottom">
        <van-picker
          show-toolbar
          :columns="columns"
          @confirm="onConfirm"
          @cancel="showPicker = false"
        />
      </van-popup>
    <van-field label="问题描述" autosize type="textarea" :value="questionDetail" />
    <br />
    <van-button round type="info" size="large">提交</van-button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      showPicker:false,
      columns: ["轻微", "一般", "严重", "非常严重"],
      questionDetail: "",
      questionValue:'轻微'
    };
  },
  created() {},
  methods: {
    onConfirm(value) {
      this.questionValue = value;
      this.showPicker = false;
    },
  },
  computed: {
    companyName() {
      return this.$route.params.title;
    },
  },
};
</script>

<style scoped lang="less">
h3 {
  text-align: center;
}
</style>
